package 
{
	import flash.display.MovieClip;
	import org.flixel.*;
	import org.flixel.system.FlxPreloader;
	import flash.display.Sprite;
	import flash.events.Event;
	/**
	 * ...
	 * @author morgan
	 */

	[SWF(width='640',height='480',backgroundColor='#ffffff',frameRate='60')]	
	public class Main extends MovieClip{
		public function Main(){
			super();
			if(stage) init()
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(event:Event = null):void{
			if(event) removeEventListener(Event.ADDED_TO_STAGE, init);
			var game:FlixelMain = new FlixelMain();
			addChild(game);
			//Entry point, start up Flixel or whatever here, not that the stage isn't null
		}
	}
}